<!doctype html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>红包详情</title>
  <link rel="stylesheet" type="text/css" href="../css/api.css" />
  <link rel="stylesheet" type="text/css" href="../css/dating.css" />
</head>

<body>
  <div id="app" v-cloak>
    <div class="wrap flex-wrap flex-vertical">
      <header id="header">
        <div class="header-wrap border-bottom">
          <div class="header-left" onclick="api.closeWin()">
            <i class="iconfont icon-pre"></i>
          </div>
          <div class="header-title">红包详情</div>
        </div>
      </header>
      <div class="flex-con">
        <div v-if="list.length > 0" class="reply-list">
          <div v-for="(item, i) in list" :key="item.id" class="reply-item border-bottom" @click="openDetail(item.member_id)">
            <div class="avatar">
              <img :src="item.member.avatar" alt="">
            </div>
            <div class="info-wrap">
              <div class="name">{{item.member.name}}
                <span :class="['age' + item.member.sex]">
                  <i :class="['icon-sex' + item.member.sex, 'iconfont']"></i>{{item.member.age}}
                </span>
              </div>
              <div class="info">{{item.member.city}}</div>
            </div>
            <div class="value">
              <i class="icon icon-gold"></i>
              <!-- <img src="../image/zuan1_icon.png" alt=""> -->
              <span>{{item.price}}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
  var app;
  apiready = function () {
    $api.fixStatusBar($api.dom('#header'));
    app = new Vue({
      el: '#app',
      data: {
        list: [],
      },
      created: function () {
        this.getRedDetail();
      },
      mounted: function () {},
      methods: {
        getRedDetail: function () {
          var _this = this;
          api.showProgress({
            title: '',
            text: '加载中……'
          });
          api.ajax({
            url: baseUrl + 'red/detail',
            method: 'get',
            headers: {
              token: $api.getStorage('deviceToken')
            },
            data: {
              values: {
                uid: $api.getStorage('uid'),
                id: api.pageParam.id
              },
            }
          }, function (ret, err) {
            api.refreshHeaderLoadDone();
            api.hideProgress();
            if (ret.status == 200) {
              _this.list = ret.data;
            }
          })
        },

      },
      filters: {
      }
    })
  }
</script>